package com.sais.manage.boot.platform.dto;

import com.sais.manage.boot.platform.entity.User;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * 宿舍管理系统-用户添加 DTO
 *
 * @author zhang
 * @date 2019/11/30
 **/
@Data
@NoArgsConstructor
public class UserSaveDTO {

    private String ukId;
    private String account;
    private String password;
    private String username;
    private String passwordType;
    private Integer status;
    private Integer sort;

    private UserInfoDTO userInfo;

    private String orgId;
    private List<String> roleIds;

    public User convert() {
        User user = new User();
        BeanUtils.copyProperties(this, user);
        return user;
    }

}
